import { createAppContainer } from "react-navigation";
import { createStackNavigator } from "react-navigation-stack";
import { fromLeft } from "react-navigation-transitions";
import SplashScreen from "../pages/splash/splash-screen";
import MainNavigator from "./main-navigator";
import AuthNavigator from "./auth-navigator";
import RichTextScreen from "../pages/web/rich-text-screen";
import VideoScreen from "../pages/videoview/videoview-screen";
import ExampleScreen from "../pages/example/example-screen";
import WebPageScreen from "../pages/web/web-page-screen";
import ModalNavigator from "./modal-navigator";
import { Platform } from "react-native";

const AppNavigator = createStackNavigator(
  {
    Splash: SplashScreen,
    Auth: {
      screen: AuthNavigator,
      navigationOptions: {
        header: null,
        headerBackTitleStyle: Platform.OS === 'ios' && {
          height: 0,
          width: 0,
        },
      },
    },
    Main: {
      screen: MainNavigator,
      navigationOptions: {
        header: null,
        headerBackTitleStyle: Platform.OS === 'ios' && {
          height: 0,
          width: 0,
        },
      },
    },
    Modal: ModalNavigator,
    RichText: RichTextScreen,
    WebPage: WebPageScreen,
    Video: VideoScreen,
    Example: ExampleScreen,
  },
  {
    initialRouteName: 'Splash',
    // initialRouteName: 'Example',
    transitionConfig: () => fromLeft(),
  },
);

export default createAppContainer(AppNavigator);
